package foodmaterial.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import foodmaterial.utils.Constants;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.Date;

/**
 * 供应商
 */
public class Supplier implements Serializable {
    private static final long serialVersionUID = 8203366413970898930L;

    private Long id ;
    @NotEmpty(message = "供应商名称不能为空")
    @Length(max=100,message = "供应商名称最大不能超过{max}个字符")
    private String name; //'名称',
    @NotEmpty(message = "供应商联系电话不能为空")
    @Length(max=100,message = "供应商联系电话最大不能超过{max}个字符")
    private String tel; //'联系电话',
    @Length(max=100,message = "供应商地址最大不能超过{max}个字符")
    private String address ; // '地址',
    @Length(max=200,message = "备注最大不能超过{max}个字符")
    private String remark ; //'备注',
    private String credentials ;// '资质-有就放地址'
    private boolean hasCredentials ;
    @JsonFormat(pattern= Constants.DEFAULT_DATE_FORMAT,timezone="GMT+8")
    private Date expiredDate; // '资质到期时间'
    private Boolean enabled; //'启用标志-1启用-0禁用'
    private String label ;//打印标签

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getCredentials() {
        return credentials;
    }

    public void setCredentials(String credentials) {
        this.credentials = credentials;
    }

    public Date getExpiredDate() {
        return expiredDate;
    }

    public void setExpiredDate(Date expiredDate) {
        this.expiredDate = expiredDate;
    }

    public Boolean getEnabled() {
        return enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public boolean isHasCredentials() {
        return hasCredentials;
    }

    public void setHasCredentials(boolean hasCredentials) {
        this.hasCredentials = hasCredentials;
    }

}
